#include <myheader_c_plus.h>
using std::cout;
using std::cin;
using std::string;
using std::endl;
using std::cerr;
using std::ifstream;
using std::ofstream;
using std::fstream;
void test(){
    int num;
    while(1){
        cin >> num;
        if(cin.fail()){
            cout << "cin is not good" << endl;
            cin.clear();
            cin.ignore();
        }else if(cin.eof() || cin.bad()){
            cout << "cin is over" << endl;
            break;
        }else cout << "num =" << num << endl;

    }

}

void test1(){
    for(int i = 0; i < 1024; i++){
        cout << 'a';
    } 
    cout.flush();
    sleep(5);
    cout << 'b' << endl;
    sleep(2);

}


void test2(){
    cerr << 1;
    cout << 3;
    sleep(2);
    
}

//文件输出流
void test4(){
    ofstream ofs;
    string s1("hello world");
    ofs << s1 ;

}
int main(int argc, char *argv[])
{
    test4();
    return 0;
}

